package android.money.db;


public class DBInfo {
    public static final String DATABASE_NAME = "androidmoney";
    public static final int DATABASE_VERSION = 1;
    
    /* User Information */
    public static final String TABLE_USERINFO_NAME = "userinfo";
    public static final String userinfo_id = "_id";
    public static final String userinfo_password = "password";
    public static final String TABLE_USERINFO_CREATE = "create table "+TABLE_USERINFO_NAME+" (" +
    userinfo_id+" integer primary key autoincrement, "+
    userinfo_password+" text not null);";
    
    /* Account */
    public static final String TABLE_ACCOUNT_NAME = "account";
	public static final String account_id = "_id";
	public static final String account_number ="number";
	public static final String account_sec_code = "sec_code";
	public static final String account_type = "type";
	public static final String account_expire_month ="expiremonth";
	public static final String account_expire_year="expireyear";
	public static final String account_holder_name="holdername";	
	public static final String account_name="accname";
	public static final String account_piority="piority";
	
    public static final String TABLE_ACCOUNT_CREATE =
        "create table "+TABLE_ACCOUNT_NAME+" (" +
        	account_id+" integer primary key autoincrement, "+
            account_number+" text not null, " +
            account_sec_code+" text not null ," +
            account_expire_month+" integer not null," +
            account_expire_year+" integer not null," +
            account_type+" integer not null," +
            account_holder_name+" text not null," +            
            account_name+" text not null," +
            account_piority+" integer not null);";
    
    /* Transaction */
    public static final String TABLE_TRANSACTION_NAME ="mtransaction";
    public static final String trans_id = "_id";
    public static final String trans_acc_id = "acc_id";
    public static final String trans_reader = "reader";
    public static final String trans_amount = "amount";
    public static final String trans_time = "expense_time";
    public static final String trans_unit = "unit";
    
    public static final String TABLE_TRANSACTION_CREATE = 
    	"create table "+TABLE_TRANSACTION_NAME+" (" +
    			trans_id+" integer primary key autoincrement," +
    			trans_acc_id+" integer not null," +
    			trans_reader+" text not null," +
    			trans_amount+" real not null," +
    			trans_unit+" text not null,"+
    			trans_time+" integer not null);";
}
